// const ParamPg = function ParamPg(pageNow = 1, size = 10) {
//     this.pageNow = pageNow;
//     this.size = size;
//     return this;
// };
class ParamPg {
    constructor(pageNow = 1, size = 10) {
        this.pageNow = pageNow;
        this.size = size;
    }
}

function pgParam({pageNow = 1, size = 10}) {
    let pg = new ParamPg(pageNow, size);
    return pg;
}

function pgBuildParam(pgParam, total = 0, row = []) {
    return pgBuild(pgParam.pageNow, pgParam.size, total, row);
}

function pgBuild(pageNow = 1, size = 10, total = 0, row = []) {
    let dt = {pageNow: pageNow, size: size, total: total, row: row};
    return dt;
}

module.exports = {
    pgParam, pgBuildParam, pgBuild
}